<div style="height:500px;width:900px;overflow-y:auto;overflow-x:hidden;">
    <div class="clearfix ng-scope ml10">
        <button class="btn" href="javascript:;" ng-click="onRefundImportNoInvoiceShow($dialogScope, '引入未开票回款', importPayment)">引入未开票回款</button>
        <button class="btn" href="javascript:;" ng-click="onRefundImportNoInputShow('引入待录入回款')">引入待录入回款</button>

    </div>
    <form name="editRefundForm" class="form-horizontal" novalidate>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">财务编号</span>

            <div class="col-sm-8">
                <input type="text" ng-model="refundInfo.finance_code" ng-disabled="true" class="form-control"
                       id="inputPrice"
                       placeholder="财务编号"
                       required name="finance_code">
                <span role="alert"
                      ng-show="(editRefundForm.$submitted || editRefundForm.finance_code.$touched) && editRefundForm.finance_code.$error.required"
                      class="error ng-hide c-red lh30">财务编号不能为空</span>
            </div>

            <span class="col-sm-4 control-label">登记时间</span>

            <div class="col-sm-8">
                <input type="text" class="input-date fl form-control" ng-disabled="true" style="width:100%"
                       ui-date format="yyyy-MM-dd" ng-model="refundInfo.register_date" placeholder="登记时间">
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">实收金额</span>

            <div class="col-sm-8">
                <input type="number" ng-model="refundInfo.payment_amount" class="form-control" id="inputPrice"
                       placeholder="实收金额"
                       required number name="payment_amount">
                <span role="alert"
                      ng-show="(editRefundForm.$submitted || editRefundForm.payment_amount.$touched) && editRefundForm.payment_amount.$error.required"
                      class="error ng-hide c-red lh30">实收金额不能为空</span>
                <span role="alert"
                      ng-show="(editRefundForm.$submitted || editRefundForm.payment_amount.$touched) && editRefundForm.payment_amount.$error.number"
                      class="error ng-hide c-red lh30">实收金额必须为数值类型</span>
            </div>

            <span class="col-sm-4 control-label">实收时间</span>

            <div class="col-sm-8">
                <input type="text" class="input-date fl form-control" ng-disabled="true" style="width:100%"
                       ui-date format="yyyy-MM-dd" ng-model="refundInfo.payment_date" placeholder="实收时间">
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">实收款编号</span>

            <div class="col-sm-8">
                <input type="text" ng-model="refundInfo.payment_code" ng-disabled="true" class="form-control"
                       id="inputPrice"
                       placeholder="实收款编号"
                       name="payment_code">
            </div>

            <span class="col-sm-4 control-label">收款账户</span>

            <div class="col-sm-8">
                <input type="text" ng-model="refundInfo.receivables_account_name" ng-disabled="true" class="form-control"
                       id="inputPrice"
                       placeholder="收款账户"
                       required name="receivables_account">
                <span role="alert"
                      ng-show="(editRefundForm.$submitted || editRefundForm.receivables_account.$touched) && editRefundForm.receivables_account.$error.required"
                      class="error ng-hide c-red lh30">收款账户不能为空</span>
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">付款账号名称</span>

            <div class="col-sm-8">
                <input type="text" ng-model="refundInfo.payment_account_name" ng-disabled="true"
                       class="form-control" id="inputPrice"
                       placeholder="付款账号名称"
                       required name="payment_account_name">
                <span role="alert"
                      ng-show="(editRefundForm.$submitted || editRefundForm.payment_account_name.$touched) && editRefundForm.payment_account_name.$error.required"
                      class="error ng-hide c-red lh30">付款账号名称不能为空</span>
            </div>
        </div>

        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">备注</span>

            <div class="col-sm-20">
                <textarea type="text" ng-model="refundInfo.remark" class="form-control" id="inputPrice"
                          placeholder="备注" rows="4"></textarea>
            </div>
        </div>

    </form>

    <div class="mt20 clearfix ng-scope ml10">
        <span class="fl lh30 f14">发票信息</span>
    </div>
    <div id="grid" class="table-wrap mt10 ml10" style="min-height: 200px;">

        <table width="100%">
            <thead>
            <tr>
                <th width="30"></th>
                <th width="40">序号</th>
                <th>发票信息</th>
                <th width="170">开票信息</th>
                <th width="175">款项名称</th>
                <th width="120">回款金额信息</th>
                <th width="108">已关联回款</th>
                <th width="108">备注</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="record in editInvoicePayments">
                <td class="align-m"><input type="checkbox" ng-model="record._checked" ng-change="shareAmount()"></td>
                <td height="40"><p ng-bind="$index + 1"></p></td>
                <td class="lh14">
                    <p ng-bind="record.invoice_no"></p>

                    <p class="c-gray">客户名称:{{record.customer_name}}</p>
                </td>
                <td>
                    <p>开票金额:{{record.invoice_amount|number:2}}</p>

                    <p>已开票金额:{{record.cur_billing_amount|number:2}}</p>

                    <p class="c-gray">开票日期:{{record.invoice_date|strdate:'yyyy-MM-dd'}}</p>
                </td>
                <td>
                    <p ng-bind="record.receivable_item_name"></p>
                </td>
                <td>
                    <p>已回款金额:{{record.total_payment|number:2}}</p>

                    <p class="c-gray">待回款金额:{{record.cur_billing_amount-record.total_payment|number:2}}</p>

                    <p class="c-gray">本次回款金额:{{record.cur_payment_amount|number:2}}</p>
                </td>
                <td>
                    <p ng-bind="record.finance_code"></p>
                </td>

                <td>
                    <p ng-bind="record.remark"></p>
                </td>

            </tr>
            </tbody>
        </table>
        <div class="no-data" ng-if="funds.length == 0" style="height:180px"><span>暂无数据</span></div>

    </div>
</div>


<div id="importRefundDlg" class="importRefundDlg" style="overflow-y:auto;overflow-x:hidden;display: none;height:450px;">
    <div class="ml10 clearboth" ng-if="importType == 2">
        <input class="input-text fl ng-pristine ng-untouched ng-valid" style="width: 470px;" type="text"
               placeholder="付款客户名称" ng-model="keywords" ng-enter="search(keywords)"/>
        <a class="btn" href="javascript: void(0)" ng-click="search(keywords)">查询</a>
    </div>
    <div id="grid" class="table-wrap mt10 ml10" style="min-height: 200px;">

        <table width="100%">
            <thead>
            <tr>
                <th width="35" class="align-m">序号</th>
                <th width="210">财务编号</th>
                <th width="120">付款客户</th>
                <th width="90" class="align-r">{{importType == 1? '回款金额':'收入金额'}}</th>
                <th width="90" class="align-r">{{importType == 1? '已开票金额':'已回款金额'}}</th>
                <th>收款账户名称</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="record in importPayments" ng-click="selectPayment(record)" ng-class="{selected:record.__selected}">
                <td height="40" class="align-m"><p ng-bind="$index + 1"></p></td>
                <td class="lh14">
                    <p ng-bind="record.finance_code"></p>
                </td>
                <td>
                    {{record.payment_account_name}}
                </td>
                <td class="align-r">
                    <p ng-bind="record.payment_amount|number:2"></p>
                </td>
                <td class="align-r">
                    <p ng-bind="record.have_payment_amount|number:2"></p>
                </td>
                <td>
                    <p ng-bind="record.receivables_account_name"></p>
                </td>
            </tr>
            </tbody>
        </table>
        <div class="no-data" ng-if="importPayments.length == 0 && !isloading" style="height:180px"><span>暂无数据</span></div>
        <div class="content-loading edit-loading" style="height: 300px;position: absolute;top: 0;width: 100%;" ng-if="isloading" ></div>

    </div>

    <style type="text/css">
        .selected,.selected td{background: #fff9ee!important;}
    </style>
</div>